﻿using Furion;
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using MyProject.Cache;
using MyProject.Entity;
using System;

namespace MyProject.EntityListener.SystemManage
{
    public class MenuAuthorizeListener : IEntityChangedListener<MenuAuthorizeEntity>
    {
        public void OnChanged(MenuAuthorizeEntity entity, DbContext dbContext, Type dbContextLocator, EntityState state)
        {
            App.GetService<MenuAuthorizeCache>().Remove();
        }

    }
}